<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>White&#39;s blog</title>
    <meta name="generator" content="VuePress 1.5.2">
    <link rel="icon" href="/press/img/favicon.ico">
    <meta name="description" content="web前端技术博客,简洁至上,专注web前端学习与总结。JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github等技术文章。">
    <meta name="keywords" content="前端博客,个人技术博客,前端,前端开发,前端框架,web前端,前端面试题,技术文档,学习,面试,JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github,markdown">
    <meta name="baidu-site-verification" content="7F55weZDDc">
    <meta name="theme-color" content="#11a8cd">
    <link rel="preload" href="/press/assets/css/0.styles.0593717a.css" as="style"><link rel="preload" href="/press/assets/js/app.5b25425f.js" as="script"><link rel="preload" href="/press/assets/js/2.f9702e2c.js" as="script"><link rel="preload" href="/press/assets/js/82.a0b26ff3.js" as="script"><link rel="prefetch" href="/press/assets/js/10.6253ebba.js"><link rel="prefetch" href="/press/assets/js/100.7e2b7228.js"><link rel="prefetch" href="/press/assets/js/101.0c856a52.js"><link rel="prefetch" href="/press/assets/js/102.7c7a60ee.js"><link rel="prefetch" href="/press/assets/js/103.5275b8f9.js"><link rel="prefetch" href="/press/assets/js/104.c31dcf82.js"><link rel="prefetch" href="/press/assets/js/105.550eabe2.js"><link rel="prefetch" href="/press/assets/js/106.bd381db4.js"><link rel="prefetch" href="/press/assets/js/107.ad84067c.js"><link rel="prefetch" href="/press/assets/js/108.c609dd1a.js"><link rel="prefetch" href="/press/assets/js/109.b64a854e.js"><link rel="prefetch" href="/press/assets/js/11.9153f1c7.js"><link rel="prefetch" href="/press/assets/js/110.67beb805.js"><link rel="prefetch" href="/press/assets/js/111.18b7663a.js"><link rel="prefetch" href="/press/assets/js/112.debfc755.js"><link rel="prefetch" href="/press/assets/js/113.b3061761.js"><link rel="prefetch" href="/press/assets/js/114.d44900c5.js"><link rel="prefetch" href="/press/assets/js/115.88e468e3.js"><link rel="prefetch" href="/press/assets/js/116.43952065.js"><link rel="prefetch" href="/press/assets/js/117.90696386.js"><link rel="prefetch" href="/press/assets/js/118.f29a8085.js"><link rel="prefetch" href="/press/assets/js/119.819f5e1c.js"><link rel="prefetch" href="/press/assets/js/12.7d7234ac.js"><link rel="prefetch" href="/press/assets/js/120.438207e3.js"><link rel="prefetch" href="/press/assets/js/121.afbc23c7.js"><link rel="prefetch" href="/press/assets/js/122.dc47f7fe.js"><link rel="prefetch" href="/press/assets/js/123.e6dd88e5.js"><link rel="prefetch" href="/press/assets/js/124.e83b8406.js"><link rel="prefetch" href="/press/assets/js/125.540e6d11.js"><link rel="prefetch" href="/press/assets/js/126.4572f44d.js"><link rel="prefetch" href="/press/assets/js/127.84367b5f.js"><link rel="prefetch" href="/press/assets/js/128.8c3c27c9.js"><link rel="prefetch" href="/press/assets/js/129.ec1a9a4a.js"><link rel="prefetch" href="/press/assets/js/13.33c9acc0.js"><link rel="prefetch" href="/press/assets/js/130.eeb375bd.js"><link rel="prefetch" href="/press/assets/js/131.998d38f1.js"><link rel="prefetch" href="/press/assets/js/132.0f80d08f.js"><link rel="prefetch" href="/press/assets/js/133.4146625d.js"><link rel="prefetch" href="/press/assets/js/134.26bad600.js"><link rel="prefetch" href="/press/assets/js/135.4d509aeb.js"><link rel="prefetch" href="/press/assets/js/136.5b295295.js"><link rel="prefetch" href="/press/assets/js/137.1e37ffd7.js"><link rel="prefetch" href="/press/assets/js/138.5ea98882.js"><link rel="prefetch" href="/press/assets/js/139.1a98f893.js"><link rel="prefetch" href="/press/assets/js/14.af5dafad.js"><link rel="prefetch" href="/press/assets/js/140.d62dd102.js"><link rel="prefetch" href="/press/assets/js/141.2eea1d39.js"><link rel="prefetch" href="/press/assets/js/142.d06b67da.js"><link rel="prefetch" href="/press/assets/js/143.92d98805.js"><link rel="prefetch" href="/press/assets/js/144.08c5350f.js"><link rel="prefetch" href="/press/assets/js/145.c446b85a.js"><link rel="prefetch" href="/press/assets/js/146.50da55b3.js"><link rel="prefetch" href="/press/assets/js/147.06e8c745.js"><link rel="prefetch" href="/press/assets/js/148.672d3d1c.js"><link rel="prefetch" href="/press/assets/js/149.a2056119.js"><link rel="prefetch" href="/press/assets/js/15.5433b59a.js"><link rel="prefetch" href="/press/assets/js/150.3c004bdb.js"><link rel="prefetch" href="/press/assets/js/151.9d50e190.js"><link rel="prefetch" href="/press/assets/js/152.b49620ed.js"><link rel="prefetch" href="/press/assets/js/153.af58591c.js"><link rel="prefetch" href="/press/assets/js/154.75ea0ff8.js"><link rel="prefetch" href="/press/assets/js/155.9b722153.js"><link rel="prefetch" href="/press/assets/js/156.d887826f.js"><link rel="prefetch" href="/press/assets/js/157.8074880c.js"><link rel="prefetch" href="/press/assets/js/158.eda281df.js"><link rel="prefetch" href="/press/assets/js/159.f8bfe341.js"><link rel="prefetch" href="/press/assets/js/16.1c70475a.js"><link rel="prefetch" href="/press/assets/js/160.3e7ff133.js"><link rel="prefetch" href="/press/assets/js/161.3964567c.js"><link rel="prefetch" href="/press/assets/js/162.f1d32b9f.js"><link rel="prefetch" href="/press/assets/js/163.f5040aa1.js"><link rel="prefetch" href="/press/assets/js/164.2a6d68a6.js"><link rel="prefetch" href="/press/assets/js/165.8998e358.js"><link rel="prefetch" href="/press/assets/js/166.d8fc6975.js"><link rel="prefetch" href="/press/assets/js/167.b5f931d4.js"><link rel="prefetch" href="/press/assets/js/168.64f88322.js"><link rel="prefetch" href="/press/assets/js/169.c7c8353e.js"><link rel="prefetch" href="/press/assets/js/17.d82773d2.js"><link rel="prefetch" href="/press/assets/js/170.d7e132e4.js"><link rel="prefetch" href="/press/assets/js/171.42199c07.js"><link rel="prefetch" href="/press/assets/js/172.dd099df8.js"><link rel="prefetch" href="/press/assets/js/173.7d1e0141.js"><link rel="prefetch" href="/press/assets/js/174.a52e20b0.js"><link rel="prefetch" href="/press/assets/js/175.efc56e87.js"><link rel="prefetch" href="/press/assets/js/176.35d01a31.js"><link rel="prefetch" href="/press/assets/js/177.d018ff1e.js"><link rel="prefetch" href="/press/assets/js/178.86ec413f.js"><link rel="prefetch" href="/press/assets/js/179.e83da0df.js"><link rel="prefetch" href="/press/assets/js/18.88b44a32.js"><link rel="prefetch" href="/press/assets/js/180.f95ea401.js"><link rel="prefetch" href="/press/assets/js/181.7f1e4926.js"><link rel="prefetch" href="/press/assets/js/182.644a8fc6.js"><link rel="prefetch" href="/press/assets/js/183.44980cee.js"><link rel="prefetch" href="/press/assets/js/184.fe8bd3a1.js"><link rel="prefetch" href="/press/assets/js/185.643accf4.js"><link rel="prefetch" href="/press/assets/js/186.a22744bd.js"><link rel="prefetch" href="/press/assets/js/187.f279721f.js"><link rel="prefetch" href="/press/assets/js/188.36e2b7eb.js"><link rel="prefetch" href="/press/assets/js/189.011553c9.js"><link rel="prefetch" href="/press/assets/js/19.6ec28d9b.js"><link rel="prefetch" href="/press/assets/js/190.6bada98a.js"><link rel="prefetch" href="/press/assets/js/191.a5d4c8b2.js"><link rel="prefetch" href="/press/assets/js/192.0f0483dc.js"><link rel="prefetch" href="/press/assets/js/193.f4dcfce7.js"><link rel="prefetch" href="/press/assets/js/194.861b800d.js"><link rel="prefetch" href="/press/assets/js/195.008473f6.js"><link rel="prefetch" href="/press/assets/js/196.6a8265e8.js"><link rel="prefetch" href="/press/assets/js/197.ca9cd52e.js"><link rel="prefetch" href="/press/assets/js/198.b93202f5.js"><link rel="prefetch" href="/press/assets/js/199.ffe72e28.js"><link rel="prefetch" href="/press/assets/js/20.bab3522f.js"><link rel="prefetch" href="/press/assets/js/200.7238f5c6.js"><link rel="prefetch" href="/press/assets/js/201.b2177464.js"><link rel="prefetch" href="/press/assets/js/202.f8d2ae8c.js"><link rel="prefetch" href="/press/assets/js/21.481057ca.js"><link rel="prefetch" href="/press/assets/js/22.4b5f2970.js"><link rel="prefetch" href="/press/assets/js/23.1187cee4.js"><link rel="prefetch" href="/press/assets/js/24.a8e7171a.js"><link rel="prefetch" href="/press/assets/js/25.eacb53ab.js"><link rel="prefetch" href="/press/assets/js/26.db3921a7.js"><link rel="prefetch" href="/press/assets/js/27.283ffb15.js"><link rel="prefetch" href="/press/assets/js/28.136d84cb.js"><link rel="prefetch" href="/press/assets/js/29.66e14b39.js"><link rel="prefetch" href="/press/assets/js/3.bedb20aa.js"><link rel="prefetch" href="/press/assets/js/30.56c06669.js"><link rel="prefetch" href="/press/assets/js/31.0213ecca.js"><link rel="prefetch" href="/press/assets/js/32.e6ae6985.js"><link rel="prefetch" href="/press/assets/js/33.444253ed.js"><link rel="prefetch" href="/press/assets/js/34.06176769.js"><link rel="prefetch" href="/press/assets/js/35.08ce5ad3.js"><link rel="prefetch" href="/press/assets/js/36.fa0975b2.js"><link rel="prefetch" href="/press/assets/js/37.025fc74b.js"><link rel="prefetch" href="/press/assets/js/38.58211946.js"><link rel="prefetch" href="/press/assets/js/39.35034dae.js"><link rel="prefetch" href="/press/assets/js/4.86115ea9.js"><link rel="prefetch" href="/press/assets/js/40.f99c1051.js"><link rel="prefetch" href="/press/assets/js/41.cc25b7df.js"><link rel="prefetch" href="/press/assets/js/42.8a4ec3fb.js"><link rel="prefetch" href="/press/assets/js/43.0176aa7b.js"><link rel="prefetch" href="/press/assets/js/44.9cc7ce08.js"><link rel="prefetch" href="/press/assets/js/45.8a76f8ea.js"><link rel="prefetch" href="/press/assets/js/46.88e9f4d4.js"><link rel="prefetch" href="/press/assets/js/47.ea68ee2e.js"><link rel="prefetch" href="/press/assets/js/48.b59adcc0.js"><link rel="prefetch" href="/press/assets/js/49.f7cc369e.js"><link rel="prefetch" href="/press/assets/js/5.0b3b3705.js"><link rel="prefetch" href="/press/assets/js/50.554e1f73.js"><link rel="prefetch" href="/press/assets/js/51.aaae2fbb.js"><link rel="prefetch" href="/press/assets/js/52.d5986b9b.js"><link rel="prefetch" href="/press/assets/js/53.e59ac9a8.js"><link rel="prefetch" href="/press/assets/js/54.2bef1746.js"><link rel="prefetch" href="/press/assets/js/55.8bc7fb60.js"><link rel="prefetch" href="/press/assets/js/56.b938632c.js"><link rel="prefetch" href="/press/assets/js/57.17f940f6.js"><link rel="prefetch" href="/press/assets/js/58.5cd25796.js"><link rel="prefetch" href="/press/assets/js/59.186f4f99.js"><link rel="prefetch" href="/press/assets/js/6.879acde6.js"><link rel="prefetch" href="/press/assets/js/60.63976eea.js"><link rel="prefetch" href="/press/assets/js/61.55d73444.js"><link rel="prefetch" href="/press/assets/js/62.086e6cc7.js"><link rel="prefetch" href="/press/assets/js/63.167ad7d2.js"><link rel="prefetch" href="/press/assets/js/64.feec2a38.js"><link rel="prefetch" href="/press/assets/js/65.ecf1e223.js"><link rel="prefetch" href="/press/assets/js/66.e6c58dab.js"><link rel="prefetch" href="/press/assets/js/67.f82c8fc9.js"><link rel="prefetch" href="/press/assets/js/68.f194b443.js"><link rel="prefetch" href="/press/assets/js/69.6762fd7f.js"><link rel="prefetch" href="/press/assets/js/7.f249fc04.js"><link rel="prefetch" href="/press/assets/js/70.e6114920.js"><link rel="prefetch" href="/press/assets/js/71.0c449692.js"><link rel="prefetch" href="/press/assets/js/72.e0b603ed.js"><link rel="prefetch" href="/press/assets/js/73.0adb0f8d.js"><link rel="prefetch" href="/press/assets/js/74.13fd1836.js"><link rel="prefetch" href="/press/assets/js/75.c3986538.js"><link rel="prefetch" href="/press/assets/js/76.f0073705.js"><link rel="prefetch" href="/press/assets/js/77.abcc638b.js"><link rel="prefetch" href="/press/assets/js/78.a0192c1e.js"><link rel="prefetch" href="/press/assets/js/79.a685c080.js"><link rel="prefetch" href="/press/assets/js/8.3d0152f8.js"><link rel="prefetch" href="/press/assets/js/80.5e44f2ea.js"><link rel="prefetch" href="/press/assets/js/81.04cb398a.js"><link rel="prefetch" href="/press/assets/js/83.4f777cd6.js"><link rel="prefetch" href="/press/assets/js/84.1197786d.js"><link rel="prefetch" href="/press/assets/js/85.442c3413.js"><link rel="prefetch" href="/press/assets/js/86.eff815d9.js"><link rel="prefetch" href="/press/assets/js/87.0775528b.js"><link rel="prefetch" href="/press/assets/js/88.99651152.js"><link rel="prefetch" href="/press/assets/js/89.dd8bfe7f.js"><link rel="prefetch" href="/press/assets/js/9.5f437cd8.js"><link rel="prefetch" href="/press/assets/js/90.952258ab.js"><link rel="prefetch" href="/press/assets/js/91.e9267489.js"><link rel="prefetch" href="/press/assets/js/92.78c5f042.js"><link rel="prefetch" href="/press/assets/js/93.eb2bbfc0.js"><link rel="prefetch" href="/press/assets/js/94.53f9f2b4.js"><link rel="prefetch" href="/press/assets/js/95.72cbd3f0.js"><link rel="prefetch" href="/press/assets/js/96.5666078a.js"><link rel="prefetch" href="/press/assets/js/97.b4beb259.js"><link rel="prefetch" href="/press/assets/js/98.cf7252d8.js"><link rel="prefetch" href="/press/assets/js/99.7e8c4fc7.js">
    <link rel="stylesheet" href="/press/assets/css/0.styles.0593717a.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open no-sidebar"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/press/" aria-current="page" class="home-link router-link-exact-active router-link-active"><img src="/press/img/EB-logo.png" alt="White's blog" class="logo"> <span class="site-name can-hide">White's blog</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/press/" aria-current="page" class="nav-link router-link-exact-active router-link-active">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端" class="dropdown-title"><a href="/press/web/" class="link-title">前端</a> <span class="title" style="display:none;">前端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>前端文章</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/press/pages/8143cc480faf9a11/" class="nav-link">JavaScript</a></li><li class="dropdown-subitem"><a href="/press/pages/802a1ca6f7b71c59/" class="nav-link">Vue</a></li></ul></li><li class="dropdown-item"><h4>学习笔记</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/press/note/javascript/" class="nav-link">《JavaScript教程》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/js/" class="nav-link">《JavaScript高级程序设计》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/es6/" class="nav-link">《ES6 教程》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/vue/" class="nav-link">《Vue》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/typescript-axios/" class="nav-link">《TypeScript 从零实现 axios》</a></li><li class="dropdown-subitem"><a href="/press/note/wx-miniprogram/" class="nav-link">小程序笔记</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="页面" class="dropdown-title"><a href="/press/ui/" class="link-title">页面</a> <span class="title" style="display:none;">页面</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/8309a5b876fc95e3/" class="nav-link">HTML</a></li><li class="dropdown-item"><!----> <a href="/press/pages/0a83b083bdf257cb/" class="nav-link">CSS</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="技术" class="dropdown-title"><a href="/press/technology/" class="link-title">技术</a> <span class="title" style="display:none;">技术</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/9a7ee40fc232253e/" class="nav-link">技术文档</a></li><li class="dropdown-item"><!----> <a href="/press/pages/4c778760be26d8b3/" class="nav-link">GitHub技巧</a></li><li class="dropdown-item"><!----> <a href="/press/pages/117708e0af7f0bd9/" class="nav-link">Nodejs</a></li><li class="dropdown-item"><!----> <a href="/press/pages/41f87d890d0a02af/" class="nav-link">博客搭建</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="更多" class="dropdown-title"><a href="/press/more/" class="link-title">更多</a> <span class="title" style="display:none;">更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/f2a556/" class="nav-link">学习</a></li><li class="dropdown-item"><!----> <a href="/press/pages/aea6571b7a8bae86/" class="nav-link">面试</a></li><li class="dropdown-item"><!----> <a href="/press/pages/2d615df9a36a98ed/" class="nav-link">心情杂货</a></li><li class="dropdown-item"><!----> <a href="/press/friends/" class="nav-link">友情链接</a></li></ul></div></div><div class="nav-item"><a href="/press/about/" class="nav-link">关于</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="收藏" class="dropdown-title"><a href="/press/pages/beb6c0bd8a66cea6/" class="link-title">收藏</a> <span class="title" style="display:none;">收藏</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/beb6c0bd8a66cea6/" class="nav-link">网站</a></li><li class="dropdown-item"><!----> <a href="/press/pages/eee83a9211a70f9d/" class="nav-link">资源</a></li><li class="dropdown-item"><!----> <a href="/press/pages/12df8ace52d493f6/" class="nav-link">Vue资源</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/press/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/press/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/press/archives/" class="nav-link">归档</a></li></ul></div></div> <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar" style="display:none;"><div class="blogger"><img src="https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg"> <div class="blogger-info"><h3>White</h3> <span>前端界的小学生</span></div></div> <nav class="nav-links"><div class="nav-item"><a href="/press/" aria-current="page" class="nav-link router-link-exact-active router-link-active">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端" class="dropdown-title"><a href="/press/web/" class="link-title">前端</a> <span class="title" style="display:none;">前端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>前端文章</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/press/pages/8143cc480faf9a11/" class="nav-link">JavaScript</a></li><li class="dropdown-subitem"><a href="/press/pages/802a1ca6f7b71c59/" class="nav-link">Vue</a></li></ul></li><li class="dropdown-item"><h4>学习笔记</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/press/note/javascript/" class="nav-link">《JavaScript教程》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/js/" class="nav-link">《JavaScript高级程序设计》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/es6/" class="nav-link">《ES6 教程》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/vue/" class="nav-link">《Vue》笔记</a></li><li class="dropdown-subitem"><a href="/press/note/typescript-axios/" class="nav-link">《TypeScript 从零实现 axios》</a></li><li class="dropdown-subitem"><a href="/press/note/wx-miniprogram/" class="nav-link">小程序笔记</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="页面" class="dropdown-title"><a href="/press/ui/" class="link-title">页面</a> <span class="title" style="display:none;">页面</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/8309a5b876fc95e3/" class="nav-link">HTML</a></li><li class="dropdown-item"><!----> <a href="/press/pages/0a83b083bdf257cb/" class="nav-link">CSS</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="技术" class="dropdown-title"><a href="/press/technology/" class="link-title">技术</a> <span class="title" style="display:none;">技术</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/9a7ee40fc232253e/" class="nav-link">技术文档</a></li><li class="dropdown-item"><!----> <a href="/press/pages/4c778760be26d8b3/" class="nav-link">GitHub技巧</a></li><li class="dropdown-item"><!----> <a href="/press/pages/117708e0af7f0bd9/" class="nav-link">Nodejs</a></li><li class="dropdown-item"><!----> <a href="/press/pages/41f87d890d0a02af/" class="nav-link">博客搭建</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="更多" class="dropdown-title"><a href="/press/more/" class="link-title">更多</a> <span class="title" style="display:none;">更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/f2a556/" class="nav-link">学习</a></li><li class="dropdown-item"><!----> <a href="/press/pages/aea6571b7a8bae86/" class="nav-link">面试</a></li><li class="dropdown-item"><!----> <a href="/press/pages/2d615df9a36a98ed/" class="nav-link">心情杂货</a></li><li class="dropdown-item"><!----> <a href="/press/friends/" class="nav-link">友情链接</a></li></ul></div></div><div class="nav-item"><a href="/press/about/" class="nav-link">关于</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="收藏" class="dropdown-title"><a href="/press/pages/beb6c0bd8a66cea6/" class="link-title">收藏</a> <span class="title" style="display:none;">收藏</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/pages/beb6c0bd8a66cea6/" class="nav-link">网站</a></li><li class="dropdown-item"><!----> <a href="/press/pages/eee83a9211a70f9d/" class="nav-link">资源</a></li><li class="dropdown-item"><!----> <a href="/press/pages/12df8ace52d493f6/" class="nav-link">Vue资源</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/press/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/press/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/press/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/press/archives/" class="nav-link">归档</a></li></ul></div></div> <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav>  <!----> </aside> <div class="home-wrapper" data-v-0e9b2e39><div class="banner" style="background:rgb(40,40,45) url();" data-v-0e9b2e39><div class="banner-conent" data-v-0e9b2e39><header class="hero" data-v-0e9b2e39><!----> <h1 id="main-title" data-v-0e9b2e39>White's blog</h1> <p class="description" data-v-0e9b2e39>Web前端技术博客，积跬步以至千里。</p> <!----></header> <div class="features" data-v-0e9b2e39><div class="feature" data-v-0e9b2e39><a href="/press/web/" data-v-0e9b2e39><img src="/press/img/web.png" alt="前端" class="feature-img" data-v-0e9b2e39> <h2 data-v-0e9b2e39>前端</h2> <p data-v-0e9b2e39>JavaScript、ES6、Vue框架等前端技术</p></a></div><div class="feature" data-v-0e9b2e39><a href="/press/ui/" data-v-0e9b2e39><img src="/press/img/ui.png" alt="页面" class="feature-img" data-v-0e9b2e39> <h2 data-v-0e9b2e39>页面</h2> <p data-v-0e9b2e39>html(5)/css(3)，前端页面相关技术</p></a></div><div class="feature" data-v-0e9b2e39><a href="/press/technology/" data-v-0e9b2e39><img src="/press/img/other.png" alt="技术" class="feature-img" data-v-0e9b2e39> <h2 data-v-0e9b2e39>技术</h2> <p data-v-0e9b2e39>技术文档、教程、技巧、总结等文章</p></a></div></div></div> <div class="slide-banner" style="display:none;" data-v-0e9b2e39><div class="banner-wrapper" data-v-0e9b2e39><div class="slide-banner-scroll" data-v-0e9b2e39><div class="slide-banner-wrapper" data-v-0e9b2e39><div class="slide-item" data-v-0e9b2e39><a href="/press/web/" data-v-0e9b2e39><img src="/press/img/web.png" alt="前端" class="feature-img" data-v-0e9b2e39> <h2 data-v-0e9b2e39>前端</h2> <p data-v-0e9b2e39>JavaScript、ES6、Vue框架等前端技术</p></a></div><div class="slide-item" data-v-0e9b2e39><a href="/press/ui/" data-v-0e9b2e39><img src="/press/img/ui.png" alt="页面" class="feature-img" data-v-0e9b2e39> <h2 data-v-0e9b2e39>页面</h2> <p data-v-0e9b2e39>html(5)/css(3)，前端页面相关技术</p></a></div><div class="slide-item" data-v-0e9b2e39><a href="/press/technology/" data-v-0e9b2e39><img src="/press/img/other.png" alt="技术" class="feature-img" data-v-0e9b2e39> <h2 data-v-0e9b2e39>技术</h2> <p data-v-0e9b2e39>技术文档、教程、技巧、总结等文章</p></a></div></div></div> <div class="docs-wrapper" data-v-0e9b2e39><span class="doc active" data-v-0e9b2e39></span><span class="doc" data-v-0e9b2e39></span><span class="doc" data-v-0e9b2e39></span></div></div></div></div> <div class="main-wrapper" data-v-0e9b2e39><div class="main-left"><div class="post-list" data-v-0e9b2e39><div><div class="post card-box iconfont icon-zhiding"><div class="title-wrapper"><h2><a href="/press/pages/5dde351274f1e39d/">如何根据系统主题自动响应CSS深色模式</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-03-31</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E9%A1%B5%E9%9D%A2">页面</a><a href="/press/categories/?category=CSS">CSS</a></span> <span title="标签" class="iconfont icon-biaoqian tags"><a href="/press/tags/?tag=css">css</a></span></div></div> <div class="excerpt-wrapper"><div class="excerpt"><h1 id="如何根据系统主题自动响应css深色模式"><a class="header-anchor" href="#如何根据系统主题自动响应css深色模式">#</a> 如何根据系统主题自动响应CSS深色模式</h1>
<p align="center">
  <img src="https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200427163531.jpg" width="500">
</p>
<p>很多人喜欢选择APP或网站中的深色模式，也许他们更喜欢这样的外观，或者他们想让自己的眼睛免受疲劳。这篇文章将告诉你如何在网站中实现一个自动的CSS深色模式，根据访客的系统主题来自动响应。</p>
</div> <a href="/press/pages/5dde351274f1e39d/" class="readmore iconfont icon-jiantou-you">阅读全文</a></div></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/51afd6/">TypeScript笔记</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-10-08</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E5%89%8D%E7%AB%AF">前端</a><a href="/press/categories/?category=%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0">学习笔记</a></span> <!----></div></div> <!----></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/c8f128/">CSS教程和技巧收藏</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-08-11</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E9%A1%B5%E9%9D%A2">页面</a><a href="/press/categories/?category=CSS">CSS</a></span> <!----></div></div> <!----></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/b30620/">Vuex</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-08-08</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E3%80%8AVue%E3%80%8B%E7%AC%94%E8%AE%B0">《Vue》笔记</a><a href="/press/categories/?category=Vuex">Vuex</a></span> <!----></div></div> <!----></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/d6d331/">反向拆解让人上瘾的套路，找回自律</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-07-22</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E6%9B%B4%E5%A4%9A">更多</a><a href="/press/categories/?category=%E5%BF%83%E6%83%85%E6%9D%82%E8%B4%A7">心情杂货</a></span> <span title="标签" class="iconfont icon-biaoqian tags"><a href="/press/tags/?tag=%E5%BF%83%E7%90%86">心理</a><a href="/press/tags/?tag=%E8%87%AA%E5%BE%8B">自律</a></span></div></div> <div class="excerpt-wrapper"><div class="excerpt"><h1 id="反向拆解让人上瘾的套路，找回自律"><a class="header-anchor" href="#反向拆解让人上瘾的套路，找回自律">#</a> 反向拆解让人上瘾的套路，找回自律</h1>
<p>当你打开手机准备学习或者查个资料的时候，很有可能不知不觉的就脱离的正规... 某某app发来通知：xx明星官宣啦、xx手游重磅上线，一起开启修仙之旅吧！ xx结衣发布新番-4k画质&amp;AR体验、99+未读信息、支付宝到账100万元.... 你心想，就看一会，就一会儿... 不知不觉两三个小时过去了，你开始焦躁、后悔、自责。第二天，你又掉进相同的坑里。你可能会纳闷，为什么我的自制力这么差？为什么对某件事欲罢不能？</p>
</div> <a href="/press/pages/d6d331/" class="readmore iconfont icon-jiantou-you">阅读全文</a></div></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/e60c81/">笔记方法</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-07-16</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E6%9B%B4%E5%A4%9A">更多</a><a href="/press/categories/?category=%E5%AD%A6%E4%B9%A0">学习</a></span> <span title="标签" class="iconfont icon-biaoqian tags"><a href="/press/tags/?tag=%E7%AC%94%E8%AE%B0%E6%96%B9%E6%B3%95">笔记方法</a></span></div></div> <!----></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/f2a556/">费曼学习法</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-07-16</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E6%9B%B4%E5%A4%9A">更多</a><a href="/press/categories/?category=%E5%AD%A6%E4%B9%A0">学习</a></span> <span title="标签" class="iconfont icon-biaoqian tags"><a href="/press/tags/?tag=%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95">学习方法</a></span></div></div> <!----></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/cd8bde/">拥抱生活，拥抱快乐</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-06-26</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E9%9A%8F%E7%AC%94">随笔</a></span> <span title="标签" class="iconfont icon-biaoqian tags"><a href="/press/tags/?tag=%E9%B8%A1%E6%B1%A4">鸡汤</a></span></div></div> <div class="excerpt-wrapper"><div class="excerpt"><p>生活在后现代的今天，很多人都有一种虚无感，认为人生没有意义。但是，人生不可能没有意义，因为当你认为没有意义的时候，一定有一个与之相对应的概念叫有意义。</p>
</div> <a href="/press/pages/cd8bde/" class="readmore iconfont icon-jiantou-you">阅读全文</a></div></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/note/js/">《JavaScript高级程序设计》笔记</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-06-12</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E7%AC%94%E8%AE%B0">笔记</a></span> <span title="标签" class="iconfont icon-biaoqian tags"><a href="/press/tags/?tag=%E7%AC%94%E8%AE%B0">笔记</a><a href="/press/tags/?tag=%E7%BA%A2%E5%AE%9D%E4%B9%A6">红宝书</a></span></div></div> <!----></div><div class="post card-box"><div class="title-wrapper"><h2><a href="/press/pages/ce818a/">搜索引擎使用技巧</a></h2> <div class="article-info"><span title="作者" class="iconfont icon-touxiang">xugaoyi</span> <span title="创建时间" class="iconfont icon-riqi">2020-05-24</span> <span title="分类" class="iconfont icon-wenjian"><a href="/press/categories/?category=%E6%9B%B4%E5%A4%9A">更多</a><a href="/press/categories/?category=%E5%AD%A6%E4%B9%A0">学习</a></span> <span title="标签" class="iconfont icon-biaoqian tags"><a href="/press/tags/?tag=%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7">搜索技巧</a></span></div></div> <!----></div></div></div> <div class="pagination" data-v-0e9b2e39><span class="card-box prev iconfont icon-jiantou-zuo disabled"><p>上一页</p></span> <div class="pagination-list"><span class="card-box active">1</span> <span title="上两页" class="ellipsis ell-two" style="display:none;"></span> <span class="card-box" style="display:;">2</span> <span class="card-box">3</span> <span title="下两页" class="ellipsis ell-four" style="display:;"></span> <span class="card-box" style="display:none;">17</span> <span class="card-box">18</span></div> <span class="card-box next iconfont icon-jiantou-you"><p>下一页</p></span></div> <div class="theme-vdoing-content custom card-box content__default" data-v-0e9b2e39></div></div> <div class="main-right"><aside class="blogger-wrapper card-box" data-v-0e9b2e39><div class="avatar"><img src="https://cdn.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg" alt="头像" title="我好看吗"></div> <div class="icons"><a href="mailto:894072666@qq.com" title="发邮件" target="_blank" class="iconfont icon-youjian" style="width:33.333333333333336%;"></a><a href="https://github.com/xugaoyi" title="GitHub" target="_blank" class="iconfont icon-github" style="width:33.333333333333336%;"></a><a href="https://music.163.com/#/playlist?id=755597173" title="听音乐" target="_blank" class="iconfont icon-erji" style="width:33.333333333333336%;"></a></div> <div class="blogger"><span class="name">White</span> <span class="slogan">前端界的小学生</span></div></aside> <div class="categories-wrapper card-box" data-v-0e9b2e39><a href="/press/categories/" title="全部分类" class="title iconfont icon-wenjianjia">文章分类</a> <div class="categories"><a href="/press/categories/?category=%E9%A1%B5%E9%9D%A2">
      页面
      <span>18</span></a><a href="/press/categories/?category=CSS">
      CSS
      <span>16</span></a><a href="/press/categories/?category=%E5%89%8D%E7%AB%AF">
      前端
      <span>16</span></a><a href="/press/categories/?category=%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0">
      学习笔记
      <span>2</span></a><a href="/press/categories/?category=%E3%80%8AVue%E3%80%8B%E7%AC%94%E8%AE%B0">
      《Vue》笔记
      <span>26</span></a><a href="/press/categories/?category=Vuex">
      Vuex
      <span>1</span></a><a href="/press/categories/?category=%E6%9B%B4%E5%A4%9A">
      更多
      <span>10</span></a><a href="/press/categories/?category=%E5%BF%83%E6%83%85%E6%9D%82%E8%B4%A7">
      心情杂货
      <span>2</span></a><a href="/press/categories/?category=%E5%AD%A6%E4%B9%A0">
      学习
      <span>7</span></a><a href="/press/categories/?category=%E9%9A%8F%E7%AC%94">
      随笔
      <span>2</span></a> <a href="/press/categories/" class="more">更多...</a></div></div> <div class="tags-wrapper card-box" data-v-0e9b2e39><a href="/press/tags/" title="全部标签" class="title iconfont icon-biaoqian1">热门标签</a> <div class="tags"><a href="/press/tags/?tag=css" style="background:#11a8cd;--random-color:#11a8cd;">css</a> <span></span><a href="/press/tags/?tag=%E5%BF%83%E7%90%86" style="background:#F47E60;--random-color:#F47E60;">心理</a> <span></span><a href="/press/tags/?tag=%E8%87%AA%E5%BE%8B" style="background:#849B87;--random-color:#849B87;">自律</a> <span></span><a href="/press/tags/?tag=%E7%AC%94%E8%AE%B0%E6%96%B9%E6%B3%95" style="background:#67CC86;--random-color:#67CC86;">笔记方法</a> <span></span><a href="/press/tags/?tag=%E5%AD%A6%E4%B9%A0%E6%96%B9%E6%B3%95" style="background:#849B87;--random-color:#849B87;">学习方法</a> <span></span><a href="/press/tags/?tag=%E9%B8%A1%E6%B1%A4" style="background:#F8B26A;--random-color:#F8B26A;">鸡汤</a> <span></span><a href="/press/tags/?tag=%E7%AC%94%E8%AE%B0" style="background:#849B87;--random-color:#849B87;">笔记</a> <span></span><a href="/press/tags/?tag=%E7%BA%A2%E5%AE%9D%E4%B9%A6" style="background:#F47E60;--random-color:#F47E60;">红宝书</a> <span></span><a href="/press/tags/?tag=%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7" style="background:#67CC86;--random-color:#67CC86;">搜索技巧</a> <span></span><a href="/press/tags/?tag=%E5%AD%A6%E4%B9%A0" style="background:#F8B26A;--random-color:#F8B26A;">学习</a> <span></span><a href="/press/tags/?tag=%E7%9F%A5%E8%AF%86" style="background:#849B87;--random-color:#849B87;">知识</a> <span></span><a href="/press/tags/?tag=github" style="background:#11a8cd;--random-color:#11a8cd;">github</a> <span></span><a href="/press/tags/?tag=%E5%8D%9A%E5%AE%A2" style="background:#F47E60;--random-color:#F47E60;">博客</a> <span></span> <!----></div></div></div></div></div> <div class="footer"><div class="icons"><a href="mailto:894072666@qq.com" title="发邮件" target="_blank" class="iconfont icon-youjian"></a><a href="https://github.com/xugaoyi" title="GitHub" target="_blank" class="iconfont icon-github"></a><a href="https://music.163.com/#/playlist?id=755597173" title="听音乐" target="_blank" class="iconfont icon-erji"></a></div> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2020-2020
    <span>White | <a href="https://github.com/xugaoyi/vuepress-theme-vdoing/blob/master/LICENSE" target="_blank">MIT License</a></span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">跟随系统</li><li class="iconfont icon-rijianmoshi">浅色模式</li><li class="iconfont icon-yejianmoshi">深色模式</li><li class="iconfont icon-yuedu">阅读模式</li></ul></div></div> <!----></div><div class="global-ui"><div></div></div></div>
    <script src="/press/assets/js/app.5b25425f.js" defer></script><script src="/press/assets/js/2.f9702e2c.js" defer></script><script src="/press/assets/js/82.a0b26ff3.js" defer></script>
  </body>
</html>